<?php

class Backend_UserquestionController extends Zend_Controller_Action {

    /**
     * Constructor
     */
    public function init() {
        $this->_helper->layout->setLayout('backend');
        Service_Account::checkLogin(2);
    }

    /**
     * Forward action main
     */
    public function indexAction() {
        //Get question
        $arrQuestion = (array) Service_Model::factory('Question', 'getQuestion', NULL, 'frontend');
        foreach ($arrQuestion as $val) {
            $arrRestQuest[$val['mackid']] = $val['mackname'];
        }

        $result = Service_Model::factory('UserQuestion', 'getUserQuestionAll', NULL, 'backend');

        $this->view->userquestion = $result;
        $this->view->question = $arrRestQuest;
    }
   

}

